import router from '@system.router';
import myReq from "../../common/http/myReq.js"
import data_storage from '@ohos.data.storage';
import prompt from '@system.prompt';
import featureAbility from '@ohos.ability.featureAbility';
export default {
    data: {
        title: 'World',
        img:"/common/images/avatar.png",
        imgNoLogin:"/common/images/avatar-noLogin.png",
        display:false
    },
    onInit(){
        console.log(this.display=this.$app.$def.AddressData.isLogin);
//        console.log(myReq.configData.token);
//        var context = featureAbility.getContext();
//        context.getFilesDir().then((filePath) => {
//            prompt.showToast({
//                message:filePath
//            })
//            console.info("getFilesDirSuccess:"+filePath);
//            let storage = data_storage.getStorageSync(filePath + '/mystore')
//            const token = storage.getSync("token","");
//            prompt.showToast({
//                message:token
//            })
//        });
    },
    goLogin(){
        router.push({
            uri:"pages/login/login"
        })
    },
    goMyAddress(){
        router.push({
            uri:"pages/myAddress/myAddress"
        })
    }
}
